<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="utf-8">
		<title><?php echo C('defaultinfo.name');?> - Powered By 新致HRM</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
		<meta name="description" content=""/>
		<meta name="author" content="HRM"/>
		<link rel="shortcut icon" href="__PUBLIC__/ico/favicon.png"/>
		<link rel="stylesheet" href="__PUBLIC__/css/bootstrap.css">
		<link rel="stylesheet" href="__PUBLIC__/css/hrms.css">
		<script src="__PUBLIC__/js/jquery.min.js"></script>
		<script src="__PUBLIC__/js/bootstrap.min.js"></script>
		<script src="__PUBLIC__/js/nongli.js"></script>
		<script src="__PUBLIC__/js/calendar.js"></script>
		<!--[if lt IE 9]>
		<script src="__PUBLIC__/js/html5shiv.min.js"></script>
		<script src="__PUBLIC__/js/respond.min.js"></script>
		<![endif]-->

	</head>
	<body>
<?php echo W('Navigation');?>
<div class="body-right">
	<div class="row-table">
		<div class="row-table-title">社保投保</div>
		<div class="row-table-body">
			<p class="form-title">
				<a class="pull-right btn btn-primary btn-xs" href="<?php echo U('hrm/insurance/add');?>">添加</a>社保投保员工列表
			</p>
			<form class="form-inline " method="get" action="">
				<input type="hidden" name="g" value="hrm">
				<input type="hidden" name="m" value="insurance">
				<div class="form-group">
					<label class="control-label" for="to_name">姓名</label>
					<input id="to_name" class="form-control" type="text" name="user_name" value="<?php echo ($_GET['user_name']); ?>">
					<input id="to_user_id" type="hidden" name="user_id" value="<?php echo ($_GET['user_id']); ?>>
				</div>
				<div class="form-group">
					<label class="control-label" for="to_name">投保号</label>
					<input id="tbno" class="form-control" type="text" name="tbno" value="<?php echo ($_GET['tbno']); ?>">
				</div>
				<input class="btn btn-primary" type="submit" value="搜索">
			</form>
			<form method="post" action="<?php echo U('hrm/insurance/delete');?>">
			<table class="table" style="margin-bottom:0px;">
				<tbody>
					<tr>
						<th><input type="checkbox" id="check_all"></th>
						<th>姓名</th>
						<th>投保号</th>
						<th>身份证号</th>
						<th>职位</th>
						<th>参保日期</th>
						<th>操作</th>
					</tr>
					<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
						<td><input type="checkbox" name="insurance_id[]" class="check_list" value="<?php echo ($vo["insurance_id"]); ?>"></td>
						<td><?php echo ($vo["name"]); ?></td>
						<td><a href="<?php echo U('hrm/insurance/view','id='.$vo['insurance_id']);?>"><?php echo ($vo["tbno"]); ?></a></td>
						<td><?php echo ($vo["id_num"]); ?></td>
						<td><?php echo ($vo["department_name"]); ?> - <?php echo ($vo["position_name"]); ?></td>
						<td><?php echo (date("Y-m-d",$vo["tbtime"])); ?></td>
						<td><a href="<?php echo U('hrm/insurance/edit','id='.$vo['insurance_id']);?>">编辑</a>&nbsp;|&nbsp;<a href="<?php echo U('hrm/insurance/delete','id='.$vo['insurance_id']);?>">删除</a></td>
					</tr><?php endforeach; endif; else: echo "" ;endif; ?>
				</tbody>
				<tfoot>
					<tr>
						<td><input class="btn btn-primary btn-xs" type="submit" value="删除"></td>
						<td colspan="7"><?php echo ($page); ?><div class="clear"></div></td>
					</tr>
				</tfoot>
			</table>
			</form>
		</div>
	</div>
</div>
<div class="clear"></div>
<script type="text/javascript">

$(function(){
	$("#check_all").click(function(){
		$("input[class='check_list']").prop('checked',$(this).prop('checked'));
	});
	$('#to_name').click(function(){
		$('#alert').modal({
			show:true,
			remote:"<?php echo U('core/user/getuserrindex');?>"
		});
	});
}); 
</script>
<div class="modal fade" id="alert" tabindex="-1" data-backdrop="static">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				<h4 class="modal-title" id="myModalLabel">提示信息</h4>
			</div>
			<div class="modal-body">
			<?php if(is_array($alert)): foreach($alert as $k=>$v): if(is_array($v)): foreach($v as $kk=>$vv): ?><div class="alert alert-<?php echo ($k); ?>">
					<?php echo ($vv); ?>
				</div><?php endforeach; endif; endforeach; endif; ?>
			</div>
		</div>
	</div>
</div>
<?php if(!empty($alert)): ?><script type="text/javascript">
	$('#alert').modal('show');
	var alert_n = setInterval('$("#alert").modal("hide")',1000);
	$('#alert').on('hide.bs.modal', function (e) {
		clearInterval(alert_n);
	});
</script><?php endif; ?>
		<!-- <div id="footer">
			<div class="container">
				<p class="text-muted credit">
					HRM © 2013 <a href="http://www.ccds24.com" target="_blank">河南锐骑文化传播有限公司</a>版权所有
				</p>
			</div>
		</div> -->
	</body>
</html>